<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ page session="false" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.net.test.vo.TVO" %>

<script>
function go_save(){
	var frm = document.writeFrm;
	
	if(!confirm("수정하시겠습니까?"))return;
    frm.action = "/tmemUpdate.ncb";
    frm.submit();    
	//frm.action ="/tmemUpdate.ncb";
	//frm.submit();
}

</script>
<%
	String result = request.getAttribute("result") == null ? "" : (String)request.getAttribute("result");
	if(result.equals("1")){
%>
	<script>
	alert("수정됨");
	location.href ="/tlogView.ncb";
	
	</script>
	<%}else if(!result.equals("") && !result.equals("1")){
	%>
	<script>
	alert("에러");
	
	</script>
	<%} %>
	<% TVO view = (TVO)request.getAttribute("edit"); 
		String id = "";
		String name="";
  		String password = "";     
  	
  	if(view != null){
  		id = view.getId() == null ? "" : view.getId();
  		name= view.getName() == null ? "" : view.getName();
  		password = view.getPassword() == null ? "" : view.getPassword();
  	}
	%>

<br />
<h1>회원정보수정</h1> 
<br />

<form name="writeFrm" method="POST" >
	<input type="hidden" name="upid" value="<%=id%>">
	
	<table border="1" style="width:200px;">
	
	
		<tr>
			<td>아이디 :</td>
			<td><input type="text" name="id" style="width:98;"><%=id %></td>
		</tr>
		<tr>
			<td>이름 :</td>
			<td><input type="text"  name="name" style="width:98;"  ><%=name%></td>
		</tr>
		
		<tr>
			<td>비밀번호 :</td>
			<td><input type="password"  name="password" style="width:98;"  /><%=password%></td>
		</tr>
		
	</table>
	
	<input type="button" value="수정완료" onclick="javascript:go_save()" />
	
	<br /><br /><br />

</form>





